package cn.frh.basic.query;

import lombok.Data;

@Data
public class BaseQuery {
    //当前页
    private Integer currentPage = 1;
    //每页显示条数
    private Integer pageSize = 5;

    private String keyword;

    //计算limit的第一个参数：limit a,b a-当前页的起始位置，b=pageSize
    public Integer getBegin(){
        return (this.currentPage-1) * this.pageSize;
    }
}
